package com.hudson.plugin.result.collector.server.datastore.dao;

import com.hudson.plugin.result.collector.server.datastore.dao.exceptions.NonexistentEntityException;
import com.hudson.plugin.result.collector.server.datastore.dao.exceptions.PreexistingEntityException;
import com.hudson.plugin.result.collector.server.datastore.internal.entity.PromotionsEntity;

import javax.persistence.EntityManager;

/**
 * Created by IntelliJ IDEA.
 * User: Richard
 * Date: 4/19/11
 * Time: 12:20 AM
 * To change this template use File | Settings | File Templates.
 */
public interface PromotionsEntityJpaController {
    EntityManager getEntityManager();

    void create(PromotionsEntity promotionsEntity) throws PreexistingEntityException, Exception;

    void edit(PromotionsEntity promotionsEntity) throws NonexistentEntityException, Exception;

    void destroy(int id) throws NonexistentEntityException;

    PromotionsEntity findPromotionsEntity(int id);
}
